* Stata do-file, Robustness tests for Chapter 6, Mark R. Beissinger, 
*    The Revolutionary City  
version 14
clear all
set more off
log using Robustnesstestfiles\Logfiles\robustnesstestschapter6.log, replace
* ============================================================================
* ROBUSTNESS CHECKS FOR STATISTICAL RESULTS APPEARING IN CHAPTER 6
* STATA  
* Robustness checks for results reported in Chapter 6 
* Author: Mark R. Beissinger  
* Date:  January 2022  
* Princeton, NJ 
* =============================================================================
* BEFORE RUNNING, YOU MUST SET THE DEFAULT PATH FOR WHERE THE DATA
*   FILES RESIDE
* ============================================================================
* The following datafile is used in these tests:
*   Data set of urban civic revolt locations--urbancivicspaces.dta
* =============================================================================

use urbancivicspaces.dta

* ==========================================================================
* PROBABILITY OF OPPOSITION VICTORY IF WITHIN 3/4 KILOMETER OF SEAT OF GOVT
* ==========================================================================
* Alternative tests given small sample size
logit success veryclose lnpartic, or nolog
firthlogit success veryclose lnpartic, or nolog
regress success veryclose lnpartic
* RESULT: All results remain the same

* ++++++++++++++++++++++++++++++++++++++++++++++
* Bootstrapped standard errors with bias correction
* ++++++++++++++++++++++++++++++++++++++++++++++
logit success veryclose lnpartic, vce(bootstrap, seed(1234) rep(1000)) or nolog 
estat bootstrap, all eform
* RESULT: distance variable remains statistically significant, irrespective
*	of participation levels; participation turn marginally significant

log close

clear
